package com.study.spring.boot.controller;

import com.study.mike.common.MikeService;
import com.study.spring.boot.entity.User;
import com.study.spring.boot.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: chenhs
 * @date: Created in 6:36 2019/12/20
 **/
@RestController
public class UserController {

    @Autowired
    private UserService userService;
    @Autowired
    private MikeService mikeService;

    @GetMapping("user")
    public User getUser(Integer id) {
        System.out.println(mikeService.getInfo());
        return userService.getUser(id);
    }


}
